package ch15;
import junit.framework.TestCase;

/**
 * Created by zhangyunqi on 2017/10/15.
 */
public  class LinkedQueueTest extends TestCase {

    LinkedQueue <String> queue = new LinkedQueue <String> ();


    public void testenqueue() {
        queue.enqueue ( "20162307 张韵琪" );
        queue.enqueue ( "java" +
                "100" );
        assertEquals ( "20162307 张韵琪", queue.first () );
    }


    public void testdequeue() {
        queue.enqueue ( "20162307 张韵琪" );
        queue.dequeue ();
        assertEquals ( 0, queue.size () );
    }


    public void testfirst() {
        queue.enqueue ( "java" );
        queue.enqueue ( "eeeee" );
        assertEquals("java",queue.first());


    }


    public void testisEmpty() {
        assertEquals(true,queue.isEmpty ());
    }


    public void testsize() {
        assertEquals(0,queue.size ());
        queue.enqueue ( "java" );
        assertEquals(1,queue.size ());
    }


    public void testtoString() {

    }

}